﻿using Ledict.ConditionExtract.BLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Ledict.ConditionExtract.Frm.DataProcess
{
    public partial class ShowParagraphData : Form
    {
        string Data = string.Empty;
        string item = string.Empty;
        Case_ParagraphLogicBLL cpb = new Case_ParagraphLogicBLL();

        public ShowParagraphData(string data)
        {
            InitializeComponent();
            Data = data;
        }

        private void ShowData_Load(object sender, EventArgs e)
        {
            StringBuilder sb = new StringBuilder();
            DataTable dt= cpb.GetParagraphData(Data);
            if (dt != null && dt.Rows.Count > 0)
            {
                foreach (DataRow item in dt.Rows)
                {
                    sb.Append(item["ParagraphText"] + "\r\n");
                    sb.Append("\r\n");
                }
            }
            richTextBox1.Text = sb.ToString(); 
        }


        private void ShowData_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\u001b')
                this.Close();
        }
    }
}
